<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>
/*

  // 题目三：
  const fetchData = function(){
    console.log("fetch")
  }

  const newFetchData = debounce(fetchData, 1000);

  newFetchData()
  newFetchData()
  newFetchData()

  setTimeout(()=>{
    newFetchData();
  }, 1100)

  function debounce( cb, time ){
    let t = null;
    return ()=>{
      if(t) return;
      t = setTimeout(()=>{
        cb();
        t = null;
      }, time);
    }
  }

  */

</script>
</html>